<?php

if(!$_SESSION['user']['username']){
	//redirect(BASE_URL);
}

switch($_GET['act']){
	case 'mode':
	if($_GET['val']==1){$_SESSION['mobile']=0;}
	
	if($_GET['val']==2){$_SESSION['mobile']=1;}
	
	redirect(HOME);
	break;
	
	case 'updateRating':
		require('controllers/user/updateRating.php');
		break;
			case 'history':
		require('controllers/user/history.php');
		break;
case "member":
require("controllers/user/member.php");
break;	
case "chat":
require("controllers/user/chat.php");
break;
case "post":
require("controllers/user/xpost.php");
break;

case "anime":
require("controllers/user/anime.php");
break;	
case "home":
require("controllers/user/home.php");
break;
	
case "register":
require("controllers/user/register.php");
break;
case "login":
require("controllers/user/login.php");
break;
case "facebook":

require("controllers/user/login_facebook.php");
break;


case "logout":
require("controllers/user/logout.php");
break;

case "profile":
require("controllers/user/profile.php");
break;
case "changepassword":
require("controllers/user/changepassword.php");
break;
case "forgetpassword":
require("controllers/user/forgetpassword.php");
break;
case "avatar":
require("controllers/user/avatar.php");
break;
case "thongtin":
require("controllers/user/thongtin.php");
break;
case 'post_truyen':
	require 'controllers/user/post.php';
	break;
	case 'post_truyen2':
	require 'controllers/user/post.php';
	break;
case 'post_image':
	require 'controllers/user/post.php';
	break;
case 'post_video':
	require 'controllers/user/post.php';
	break;
	
case 'post_text':
	require 'controllers/user/post.php';
	break;
case "ajax":
	
	require 'controllers/user/ajax.php';
	
	break;
case "upload":
	require 'controllers/user/post.php';
	break;


	
}


switch($_POST['act']){
	case "ajax":
		require 'controllers/user/ajax.php';
		break;
		case "getlink":
		require 'controllers/user/getlink.php';
		break;
		case "download":
		require 'controllers/user/download.php';
		break;
case "verify":
require("controllers/user/verify.php");
break;
case "avatar":
require("controllers/user/avatar.php");
exit();
break;
case "login_facebook":
require("controllers/user/facebook.php");
break;

}